/**
 * @Author: zxc
 * @Date: 2020-11-22 21:49:25
 * @func: 通用路由
 */

const router = require("koa-router")()
const { init, get, create, update, del } = require("./api")

router.get("/api/:list", init, get)
router.post("/api/:list", init, create)
router.put("/api/:list/:id", init, update)
router.delete("/api/:list/:id", init, del)

module.exports = router.routes()
